import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Text {
    public static void main(String[] args) {
        String s1 = "wlcome to cvte";
        String s2 = "come";
        List<Character> list = func(s1,s2);
        System.out.println(list);
    }
    public static List<Character> func(String str1, String str2) {
        ArrayList<Character> arrayList = new ArrayList<>();
        for (int i = 0; i < str1.length(); i++) {
            int sign = -1;
            for (int j = 0; j < str2.length(); j++) {
                if (str1.charAt(i) == str2.charAt(j)) {
                    sign = 0;
                }
            }
            if (sign == -1) {
                arrayList.add(str1.charAt(i));
            }
        }

        return arrayList;
    }
}
